package treesNgraphs;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 *
 * Created by Tzachi on 15/10/2014.
 */
public class Graph {
    Map<Integer, List<Edge>> adjList;

    public List<Edge> getAllNeighbours(int index) {
        return adjList.get(index);
    }

    public Set<Integer> getAllVertexes(){
        return adjList.keySet();
    }

    public static class Edge{
        private final int destinationVertex;
        private final int weight;

        public Edge(int destinationVertex, int weight) {
            this.destinationVertex = destinationVertex;
            this.weight = weight;
        }

        public int getDestinationVertex() {
            return destinationVertex;
        }

        public int getWeight() {
            return weight;
        }
    }
}
